<h1>Editing event</h1>

<% form_for(@event,:html => { :multipart => true }) do |f| %>
  <%= f.error_messages %>
  <%= f.hidden_field  :longitude %>
<%= f.hidden_field :latitude %>
<div style="float: left">
<table>
	<tr>
		<th><%= f.label :name %></th>
		<td><%= f.text_field :name %></td>
	</tr>
	<tr>
		<th><%= f.label :description %></th>
		<td><%= f.text_field :description %></td>
	</tr>
  
	  
		<th><%= f.label 'Photo' %></th>
		<td><%= f.file_field :avatar %></td>
	</tr>
	<tr>
		<th><%= f.label :start_date, 'Cuando empieza:' %></th>
		<td><%= f.datetime_select :start_date %></td>
	</tr>
	<tr>
		<th><%= f.label :end_date, 'Cuando termina:' %></th>
		<td><%= f.datetime_select :end_date %></td>
	</tr>
	<tr>
	
		<th><%= f.label :Categoria %></th>
		<td><select  name ="Categoria">
		<% Tag.find(:all).each do |tags| %>
		<option value= <%= tags.id%>><%=h tags.tag%></option>
		<% end %>
		
		
		</select></td>
	</tr>	
</table>
    <%= f.submit 'Actualizar datos' %>

<% end %>

<%= link_to 'Mostrar evento', @event %> |
<%= link_to 'Regresar', events_path %>
</div>
<div>
<form id="form" action="#" onsubmit="showAddress(this.address.value); return false">
     <p>        
      <input type="text" size="60" name="address" value="" />
      <input type="submit" value="Buscar" />
      </p>
    </form>
<div id="map_canvas" style="width:540px; height:350px"></div>
<script type="text/javascript">initialize(2);</script>
</div>
  